﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using Eshouse.Bll;
using Eshouse.Entity;


namespace Eshouse.web.handlers
{
    /// <summary>
    /// $codebehindclassname$ 的摘要说明
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    public class VerifyCatagoryName : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            string verify = "true";
            context.Response.ContentType = "text/plain";
            if (context.Request["catagoryTxt"] == null)
                context.Response.Write("false");
            string catagory = context.Request["catagoryTxt"].ToString();
            if (catagoryAccess.VerifyCatagoryName(catagory))
            {
                verify ="false";
            }
            context.Response.Write(verify);
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}
